package designMode.commandPattern;

/**
 * @ClassName StereoOnCommand
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/24 23:02
 * @Version 1.0
 **/
public class StereoOnCommand implements Command {

    Stereo stereo;

    public StereoOnCommand(Stereo stereo){
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.on();
        stereo.setCd();
        stereo.setVolume();
    }

    @Override
    public void undo() {
        stereo.off();
    }
}
